#include "animal.h"

animal* animal_create(void)
{
   animal* self = malloc(sizeof(animal));
   LW_ASSERT(self);
   memset(self->name, 0x00, sizeof(self->name));
   self->weight = 0;
   return self;
} 
 
void animal_destroy(animal* self)
{
    free(self);
}

char* animal_get_name(animal* self)
{
	return self->name;
}

void animal_set_name(animal* self, char* name)
{
	strncpy(self->name, name, sizeof(self->name));
}

int animal_get_weight(animal* self)
{
	return self->weight;
}

void animal_set_weight(animal* self, int weight)
{
	self->weight = weight;
}
